package com.farm.dao;

import com.farm.domain.Account;
import com.farm.domain.Address;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AccountDao {
    public Account login(@Param("loginName") String loginName, @Param("passWord") String passWord);

    public Integer register(Account account);

    public Account repeat(String loginName);

    public Account checkToken(Account account);

    public Integer uploadProfilePicture(Account account);

    public Account getUserInfo(Account account);

    public Integer addAddress(Address address);

    public Integer updateAddress(Address address);

    public Integer delAddressInfo(String id);

    public List<Address> getAddressInfo(String userId);


    public Integer userRemoval(Account account);

    public Integer userRemovalProduceStatus(String merchantID);

    public Integer updateInfo(Account account);

    /**服务器专用接口查询**/
    public Account getAll(String loginName);

    public Account getUserInfoById(String id);

    public Address getAddressInfoById(String id);


}
